package com.itheima02;

import java.util.Arrays;
import java.util.Random;

public class 随机生成一个数组 {

    public static void main(String[] args) {

        int[] end = randomArr();

        System.out.println(Arrays.toString(end));
    }

    public static int[] randomArr() {

        Random r = new Random();

        int[] arr = new int[5];

        for (int i = 0; i < arr.length; i++) {

            arr[i] = r.nextInt(100) + 1;

        }
        return arr;
    }

}
